package cn.duli.xianer.service.impl;

import cn.duli.xianer.dao.WantGoodsPictureMapper;
import cn.duli.xianer.pojo.WantGoodsPicture;
import cn.duli.xianer.service.WantGoodsPictureService;
import com.github.pagehelper.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class WantGoodsPictureServiceImpl implements WantGoodsPictureService {

    @Resource
    private WantGoodsPictureMapper wantGoodsPictureMapper;

    @Override
    public void save(WantGoodsPicture wantGoodsPicture) {
        wantGoodsPictureMapper.save(wantGoodsPicture);
    }

    @Override
    public void deleteById(Integer wgpId) {
        wantGoodsPictureMapper.deleteById(wgpId);
    }

    @Override
    public void update(WantGoodsPicture wantGoodsPicture) {
        wantGoodsPictureMapper.update(wantGoodsPicture);
    }

    @Override
    public void updateMainPic(WantGoodsPicture wantGoodsPicture) {
        wantGoodsPictureMapper.updateMainPic(wantGoodsPicture);
    }

    @Override
    public List<WantGoodsPicture> findByGoodsId(Integer wgpWgid) {
        return wantGoodsPictureMapper.findByGoodsId(wgpWgid);
    }

    @Override
    public WantGoodsPicture findMainPicByGoodsId(Integer wgpWgid) {
        return wantGoodsPictureMapper.findMainPicByGoodsId(wgpWgid);
    }

    @Override
    public Page<WantGoodsPicture> findAll() {
        return wantGoodsPictureMapper.findAll();
    }

    @Override
    public void batchDelete(List<Integer> list) {
        wantGoodsPictureMapper.batchDelete(list);
    }

    @Override
    public WantGoodsPicture findById(Integer wgpId) {
        return wantGoodsPictureMapper.findById(wgpId);
    }

    @Override
    public void updateById(WantGoodsPicture wantGoodsPicture) {
        wantGoodsPictureMapper.updateById(wantGoodsPicture);
    }
}
